package cn.tedu.collection;

import org.junit.Test;

import java.util.Arrays;

/**本类用于集合前的一些测试*/
public class Demo {
    //单元测试方法 public + void + 没有参数 + @Test

    //1.完成单元测试方法saveStudent
    @Test
    public void saveStudent(){
        Student s1 = new Student("张三",3,'男');
        Student s2 = new Student("李四",4,'男');
        Student s3 = new Student("王五",5,'男');
        Student[] s = new Student[3];
        s[0] = s1;
        s[1] = s2;
        s[2] = s3;
        System.out.println(Arrays.toString(s));
    }


    @Test
    public void testArray(){
        int[] a = {1,2,3};
        int[] a2 = new int[3];
        a2[0] = 1;
        a2[1] = 2;
        a2[2] = 3;
        System.out.println(Arrays.toString(a));
        System.out.println(Arrays.toString(a2));
    }


    //2.创建Student类，定义属性name age gender，并全参构造
}
